Skip to content

[Motions 2026 03 lwg 2] P4146R0 C++ Standard Library Immediate Issues#8935

Merged
tkoeppe merged 37 commits intomainfrom
motions-2026-03-lwg-2
Apr 18, 2026
Merged

[Motions 2026 03 lwg 2] P4146R0 C++ Standard Library Immediate Issues#8935
tkoeppe merged 37 commits intomainfrom
motions-2026-03-lwg-2

Conversation

@burblebee
Copy link
Copy Markdown
Contributor

Fixes #8836.

@burblebee burblebee marked this pull request as ready for review April 9, 2026 14:26
@eisenwave eisenwave added this to the post-2026-03 milestone Apr 12, 2026
@tkoeppe tkoeppe force-pushed the motions-2026-03-lwg-2 branch from 29c2e35 to ed9db42 Compare April 12, 2026 20:19
@tkoeppe tkoeppe force-pushed the motions-2026-03-lwg-2 branch 2 times, most recently from 45d9c2d to b87b2ae Compare April 13, 2026 22:43
Comment thread source/utilities.tex Outdated
Comment thread source/containers.tex
Copy link
Copy Markdown
Member

@jwakely jwakely left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some changes, some comments not requiring actions, and some questions.

Comment thread source/exec.tex Outdated
Comment thread source/exec.tex
After that invokes \tcode{\exposid{handle}.resume()}.
\end{itemdescr}

\indexlibrarymember{\exposid{get-stop-token}}{task::\exposid{state}}%
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should this exposition-only member function be indexed? Huh, we do it for lots of others ... OK then.

Comment thread source/exec.tex Outdated
Comment thread source/exec.tex
Otherwise, it is expression-equivalent to
\tcode{\exposid{MANDATE-NOTHROW}(rcvr.set_value(vs...))}.

\mandates
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we want a new paragraph for this? The issue doesn't request it, and some other places in [exec] have Mandates attached to other paragraphs (or list items), so I'm not sure.

Suggested change
\mandates
\pnum
\mandates

If we do it here, we should do it below as well.

(Maybe our library element macros like \mandates and \expects should have an implicit \pnum, and then have a raw form for cases like this and [structure.specifications] and [exec.get.fwd.progress] p2 where we don't want a new paragraph and a pnum.)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a weird case where we're not in an itemdescr, so our existing guidance doesn't really apply. I thought we'd just go with what's in the paper, but I agree that this sitution could do with some thought.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[exec] has quite a lot of these cases.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Alright, OK. That's certainly one less discrepancy with how it's used inside itemdecls.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

But let's do that later, since it touches a lot of pre-existing mandates.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think I count 16 occurrences of \mandates without preceding \pnum.

Comment thread source/exec.tex Outdated
Comment thread source/exec.tex
Comment thread source/exec.tex Outdated
Comment thread source/algorithms.tex Outdated
Comment thread source/algorithms.tex Outdated
Comment thread source/meta.tex Outdated
returns an object \exposid{V} such that
\tcode{\exposid{V}.data()[\exposid{V}.size()]} equals \tcode{'\textbackslash 0'}.
Each element of the range
\tcode{\exposid{V}.data() +} \range{0}{\exposid{V}.size()}
Copy link
Copy Markdown
Member

@jwakely jwakely Apr 14, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should be a closed range, not half-open, and the + should be math font not code font:

Suggested change
\tcode{\exposid{V}.data() +} \range{0}{\exposid{V}.size()}
$\tcode{\exposid{V}.data()} + \crange{0}{\exposid{V}.size()}$

We have the \countedrange macro for X+[0,n) but it always uses a half-open range. We could add \countedcrange for X+[0,n] but I think this is the only place we need it.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Did we have to say it so weirdly? Why not [V.data(), V.data() + V.size()]...? I understand the appeal of "itetor plus range" notation when it's elegant and compact, but here we already have to say two member function calls of V anyway...

@tkoeppe tkoeppe force-pushed the motions-2026-03-lwg-2 branch 3 times, most recently from 41d414d to 5f316fe Compare April 18, 2026 00:07
@tkoeppe tkoeppe requested a review from jwakely April 18, 2026 00:09
Fixes NB US 257-382 (C++26 CD).

Editorial note:
* [task.state] Insert comma in "if ... is true, returns ...".
* [task.state] Change "After that" to "Finally,".
… min/max considerations

Fixes NB US 142-236 (C++26 CD).
… requests to spawned work

[exec.spawn.future] "receiver" in struct "future-operation" renamed to "receiverx"
due to concept of same name.
…to concat_view

Fixes NB FR 025-246 (C++26 CD).
Fixes NB US 81-149 (C++26 CD).
@tkoeppe tkoeppe force-pushed the motions-2026-03-lwg-2 branch from 5f316fe to 4c8da02 Compare April 18, 2026 00:10
@tkoeppe tkoeppe merged commit 5a7a924 into main Apr 18, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[2026-03 LWG Motion 2] P4146R0 C++ Standard Library Immediate Issues

4 participants